<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

    <h1>更新员工数据</h1>

    <form th:action="@{/emp}" method="post">

        <!-- 附带表单隐藏域：将 POST 请求转换为 PUT 请求 -->
        <input type="hidden" name="_method" value="PUT" />

        <!-- 附带表单隐藏域：实体类的 id -->
        <input type="hidden" name="empId" th:value="${emp.empId}" />

        <!-- 附带表单隐藏域：来源页的页码 -->
        <input type="hidden" name="pageNo" th:value="${pageNo}" />

        <!-- 常规表单项回显 -->
        员工姓名：<input type="text" name="empName" th:value="${emp.empName}" /><br/>
        员工工资：<input type="text" name="empSalary" th:value="${emp.empSalary}" /><br/>
        <button type="submit">更新</button>
    </form>

</body>
</html>